package com.SDU.policedispatch.controller;

import com.SDU.policedispatch.entity.PersonnelInfo;
import com.SDU.policedispatch.mapper.PolicemanMapper;

import com.SDU.policedispatch.service.PoliceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
public class PolicemanController {

    @Autowired(required=false)
    private PolicemanMapper policemanMapper;

    @Autowired
    private PoliceService policeService;

    // void test() {
    //     List<BasicPerson> basicPersons = policemanMapper.allselect();
    //     for (BasicPerson basicPerson : basicPersons) {
    //         System.out.println(basicPerson);
    //     }
    // }

    @GetMapping("/assignPolice")    
    public List<PersonnelInfo> assignPolice() {
        return policeService.assignPolice(10);
    }
    
}
